home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ShareWare OnLine 2
/
ShareWare OnLine Volume 2 (CMS Software)(1993).iso
/
elecmail
/
cs_mac07.zip
/
CS-MAC.MAC
< prev
next >
Wrap
Text File
|
1993-03-28
|
50KB
|
1,211 lines
┌────────────────────────────────┐
│ Chuck Seyboldt's COMMO Macro │ CS-MAC07:CS-MAC.MAC
└────────────────────────────────┘
*
* You will need to *> !EDIT! <* Only One (1) of these .MAC files
* ^^^^^^
* The file you are reading does *NOT* require editing.
*
*** You *must* edit your COMMO.FON to automate mail and file fetching.
* To do so automatically, Press Alt-M and choose "Add a new BBSID".
*
! * Contents: CS-COMMO.MAC The Base Commo Macro file (may REN to COMMO.MAC)
^ * TABLE.MAC Prompts for a variety of BBS and Mail doors
│ * LOGON.MAC Generic Logon and Mailrun routines
│ * ACTION.MAC File fetchin' and sendin' routines
│ * CS-MAC.MAC This text plus menu and config drivers
│ * ASSIGN.KEY List of COMMO.MAC key assignments
^ *
! * In CS-COMMO.MAC, you *NEED* to edit lines that have a "!"
* in the first column. These lines deal with BBS definition,
* F-key dialing conveniences, and Autopilot operation.
*
* All "editing required" lines are grouped near the end of CS-COMMO.MAC
* to provide easiest installation and upgrading.
*
* CS-MAC provides an automated mail and file fetchin' Commo environment.
* This automation is accomplished with several linked macros.
*
* COMMO.FON links to COMMO.MAC with a linked macro label.
* COMMO.MAC links to TABLE.MAC to setup MailWare and BBSWare responses.
* TABLE.MAC links to LOGON.MAC A generic logon occurs. If the
* macro label has an ACTION file
* associated with it .....
* LOGON.MAC links to ACTION.MAC for file transfers. After file
* transfers are complete ....
* ACTION.MAC returns to LOGON.MAC for a MAILRUN. After logoff,
* LOGON.MAC returns to COMMO.MAC and dials the next marked entry.
*
* In pictures, the sequence looks something like this .......
*
* +-------------------------+ +----------------------------+
* | 1. COMMO.FON | | 2. COMMO.MAC |
* |-------------------------| |----------------------------|
* | BBS {#} {_pas} {lnk} | ----| | {:start} set your name |
* | set bbsid, abbr, bbs ...| | | and other personal stuff |
* +-------------------------+ | | -------- |
* | | Central Commo Control |
* +----------------------------+ | | {:various} key assignments |
* | 3. TABLE.MAC | | | for manual terminal control|
* |----------------------------| | | -------- |
* | {:m_ware} MAILware prompt | |---> | {:lnk} {unmark .FON} option|
* | table | | |
* | --------- | | {:qwk} {load TABLE.MAC,qwk}| --|
* | {:bbs_type} BBSware prompt | +----------------------------+ |
* | table | |
* | --------- | |
* | {:qwk} {call m_ware} | <---------------------------------------|
* | {call bbs_type} |
* | {load LOGON.MAC,glr}| --|
* | | | +-----------------------------+
* +----------------------------+ | | 4. LOGON.MAC |
* | |-----------------------------|
* | | {:respond} set generic BBS |
* | | response strings |
* | | -------- |
* |--> | {:glr} Generic Logon Routine|
* +----------------------------+ | Using responses from |
* | 5. ACTION.MAC | | TABLE.MAC & LOGON.MAC|
* |----------------------------| | |
* | {open and read ACTION} | <----- | {ifex ACTION,load ACTION!} |
* | {fetch and send files} | | {otherwise, goto :noact} |
* | --> By BBSID | | |
* | {load LOGON.MAC,noact} | -----> | {:noact} BBSID empty? If so|
* | | | return to COMMO.MAC|
* +----------------------------+ | |
* (ACTION.MAC is optional) | {:mailrun} Open maildoor |
* | Send a .REP |
* | Take a .QWK |
* | {:byz} Loop to TABLE.MAC|
* | if %door2 exists|
* | Then to LOGON |
* | for second mail |
* | {:bye} Logoff BBS |
* | {load COMMO.MAC,aln} |
* | (Dial marked BBS's) |
* | |
* +-----------------------------+
*
* Names and definitions:
*
* %bbsid The .QWK identifier (%bbsid empty skips attempt at mail)
* %dorno The string to send to the host to get to MAILware prompt
* %mprot The mail transfer protocol to use. Z, Y, X-CRC supported
* %abbr A two or three character convenience with various uses:
* - .ext for ACTION. files. Separate ACTION per %bbsid
* - identity for .qwk renaming and ACTION. archiving
*
* BBSware: One of a variety of BBS software packages that is available.
* This family of Commo macros supports;
* - PCBoard v14.5a (Clark Development)
* - Spitfire
* - Wildcat! (Mustang Software)
* - Remote Access
* - GAP
* - T.A.G.
* - MacroBBS (Jeff Oberlee's BBS via Commo macros)
* - MAXIMUS-CBCS
*
* MAILware: One of a family of mail doors
* This family of Commo macros supports;
* - MarkMail 2 (Cliff Watkins)
* - Qmail 2 (Mark Herring)
* - Qmail 4 (Mark Herring)
* - Jimmer (Jim Goodenough)
* - Jetmail
* - MKQwk
* - DCQwk
* - Rosemail
* - Silver Express
* - Charlie's OFFline .QWK Reader
* - ZIPNEWS (Jack Kilday)
*
*───────────────────────────────────────────────────────────────────────────────
*
* Lines with a "*" may be deleted.
* Deleting my comments is a good thing to do, it saves much RAM.
* Use the macro subroutine ":strip" to automagically clean up .MACs
*
* You have exactly the same macro family that I use myself.
* Supported by COMMO v5.41 The macro text has terse commentary.
*
* You may use a file, RENQWK.BAT, in your COMMO home directory, to
* rename .QWK packets to avert download crashes. If you choose to
* not use a RENQWK.BAT, LOGON.MAC has built in renaming macro routines.
* An example RENQWK.BAT is in the LOGON.MAC file ... ready to snip out.
*
* Many thanks to Fred Brucker for providing the intelligent, excellent
* platform that supports this work. COMMO is powerful and fun.
*
* ASSUMPTIONS *
*
* These macros are setup with Zmodem as the default transfer protocol.
* I assume that you set complete drive:path\filename.ext for %z_prog
*
* KEY ASSIGNMENTS *
*
* These macros contain many features that can be called without
* being ONLINE or in a mailrun. Review ASSIGN.KEY for key assigments.
*
* FEATURES *
*
* - fast
* - runs unattended
* - one macro for many BBSs
* - one session may call several BBSs
* - works for MarkMail, Qmail, RoseMail, Jimmer, JetMail, MKQwk
* (all BBS and mail door prompts be set to EXPERT)
* - renames .QWK files (with configurable renaming methods)
* - deletes .REP files (testing ERRORLEVEL from transfer)
* - checks message count from MarkMail and other doors.
* Skips mail download if message count is less than 30.
* - ACTION PROCESSOR macro for file uploads and downloads.
* - Includes a macro (Alt-F) that will prompt you for selections
* and make the BBS specific "ACTION" lists based on your input.
* - Keeps a timestamped ACTION history file for each BBS.
* - Lean use of RAM by using multiple .MAC files instead of 1 big one.
* - Easily expands to new or changing BBSware and MAILware.
* > Can open multiple mail doors on one phone call.
* > Supports more than one type of mail reader (packet design).
* > By example, supports both .QWK and .ZNS based mail doors.
* > Autopilot facility for extended unattended running.
* > Menu driven session management and BBS additions.
* > Can be set to capture newfiles list with %flag variable.
* > Now, easier future upgrades via CS-MACxx.CFG facility.
* > Includes a macro to strip comments from .MAC files (saving RAM).
* > Includes a modem configuration macro.
*
* Support *
*
* - I really enjoy sharing COMMO. Your questions and advice
* are welcome. You may find me in U'NI's and Ilink's COMMO
* conferences almost daily ... on RIME via Directory Assistance
* occasionally ... or at NLBBS (1,207 761-4782).
* - No $ charge for this work. It's full of room to improve.
* I consider your comments to be ample payment.
*
*───────────────────────────────────────────────────────────────────────────────
*
* One of the beauties of Commo is the ease with which it can call other
* DOS programs. These assigments may help as you peruse my COMMO.MAC.
*
* Tradename Author
*
* Support files in my %ramdr are: LIST.COM (Vern Buerg)
* QEDIT.EXE (Sam Mitchell)
* DSZ.COM (Chuck Forsberg)
* as well as the requisite COMMAND.COM
*
* Support files in my %dosdir are: COMMOPNS.EXE (Shad Muegge)
* HSLINK.EXE (Sam Smith)
*
* Support files in my %utildir are: PHONE.EXE (Johnathan Wayne)
* DFR.COM (Gordon Haff)
* MJOG.COM (Chris Dunford)
*
* Support file in my %ins_dir are: COMMO.DOC (Fred Brucker)
* MACRO.DOC (Fred Brucker)
* The Home key uses your external LIST program to read docs.
*
* The %savedir holds these files: WHATEVER.CAP (session captures)
* USED-ACT.%abbr% (ACTION-file history)
* ADDRESS (address book)
* RING.LOG (timestamp of RINGs)
*
* The Commo %_hom% directory has: ASSIGN.KEY (one-page-help screen)
* ACTION.%abbr% (ACTION-file to be run)
*
* COMMO.MAC \
* TABLE.MAC \ Components
* LOGON.MAC > of CS-MAC
* ACTION.MAC / Linked to
* CS-MAC.MAC / each other
*
* RINGLOG.MAC \ Aux facilities
* DOSFUNC.MAC >
* MACROBBS.MAC / (Jeff Oberlee)
*
*───────────────────────────────────────────────────────────────────────────────
*
{:retu} {retu} ;very handy labelname
┌─────────────────────────────────────────────────┐
│ Menu driven addition of new BBSs to COMMO.FON │
└─────────────────────────────────────────────────┘
{:new_bbsid} ;Alt-M from COMMO.MAC
{sete-p0 clea}
{setv temp}
{setv bbsid}
{setv doorno}
{setv bbsware}
{setv mailware}
{inpu temp,Search %_fon for what BBS?}
{comp temp} {ifco clea}
{rope %_hom%%_fon,pick_1}
{setv count,1}
{clea}
{:id_loop}
{disp %count,1,87,Searching ...}
{read line}
{inst line,%temp}
{ifco ,id_loop}
{subs line,1,50,%line}
{disp %count,1,0e,%count. }
{disp %count,4,07,%line}
{incr count}
{goto id_loop}
{:pick_1}
{disp %count,1,07, }
{inpu cntr,Which Number? [PgUp] sees behind box}
{comp cntr} {ifco new_bbsid}
{comp cntr,%count}
{ifco-ge pick_1}
{comp cntr,0} {ifco pick_1}
{setv count,1}
{clea}
{disp 1,1,07,Scanning for "%temp%" Selection #: %cntr}
{rope %_hom%%_fon,clect_bbs}
{:next_b}
{read line}
{inst line,%temp}
{ifco ,next_b}
{comp cntr,%count}
{ifco this_b}
{incr count}
{goto next_b}
{:this_b}
{subs line,1,80,%line}
{disp 1,1,07,%line}
{rclo}
{setv cs_col,70}
{setv bbs_col,20}
{setv mwa_col,30}
{setv ope_col,50}
{setv cfm_col,60}
{disp 4,30,%cs_col, Welcome to CS-MAC }
{disp 5,30,%cs_col, Welcome to CS-MAC }
{disp 6,30,%cs_col, Welcome to CS-MAC }
{disp 7,30,%cs_col, Welcome to CS-MAC }
{disp 8,30,%cs_col, Welcome to CS-MAC }
{inpu bbsid,What is the BBSID for this Board?}
{comp bbsid} {ifco clea}
{disp 16,28,%bbs_col, pcb = PCBoard }
{disp 17,28,%bbs_col, s-f = Spitfire }
{disp 18,28,%bbs_col, wc! = Wildcat! }
{disp 19,28,%bbs_col, gap = GAP }
{disp 20,28,%bbs_col, rma = Remote Access }
{disp 21,28,%bbs_col, tag = T.A.G. }
{disp 22,28,%bbs_col, mac = MACRObbs }
{disp 23,28,%bbs_col, max = MAXIMUS-CBCS }
{sete-p0 g_0}
{:g_0} {inpu bbsware,Choose BBSware for %bbsid from the list below}
{comp bbsware,pcb} {ifco g_1}
{comp bbsware,s-f} {ifco g_1}
{comp bbsware,wc!} {ifco g_1}
{comp bbsware,gap} {ifco g_1}
{comp bbsware,rma} {ifco g_1}
{comp bbsware,tag} {ifco g_1}
{comp bbsware,mac} {ifco g_1}
{comp bbsware,max} {ifco g_1}
{goto g_0}
{:g_1} {sete-p0 g_1}
{disp 16,28,%mwa_col, mm2 = MarkMail 2 }
{disp 17,28,%mwa_col, coq = Charlie's OL qwk}
{disp 18,28,%mwa_col, qm4 = Qmail 4 }
{disp 19,28,%mwa_col, jmr = Jimmer }
{disp 20,28,%mwa_col, jet = JetMail }
{disp 21,28,%mwa_col, ros = ROSEmail }
{disp 22,28,%mwa_col, dcq = DCQwk }
{disp 23,28,%mwa_col, mkq = MKQwk }
{disp 24,28,%mwa_col, zns = ZIPNEWS Door }
{inpu mailware,Choose MAILware for %bbsid from the list below}
{comp mailware,mm2} {ifco g_2}
{comp mailware,coq} {ifco g_2}
{comp mailware,qm2} {ifco g_2}
{comp mailware,qm4} {ifco g_2}
{comp mailware,jmr} {ifco g_2}
{comp mailware,jet} {ifco g_2}
{comp mailware,ros} {ifco g_2}
{comp mailware,dcq} {ifco g_2}
{comp mailware,mkq} {ifco g_2}
{comp mailware,slx} {ifco g_2}
{comp mailware,zns} {ifco g_2}
{goto g_1}
{:g_2} {sete-p0 g_2}
{disp 16,28,%ope_col, Some examples of DOOR }
{disp 17,28,%ope_col, commands to help you: }
{disp 18,28,%ope_col, }
{disp 19,28,%ope_col, open markmail^| }
{disp 20,28,%ope_col, }
{disp 21,28,%ope_col, s^|~~~~~~~~~~f^| }
{disp 22,28,%ope_col, }
{disp 23,28,%ope_col, /Q^| }
{disp 24,28,%ope_col, }
{inpu dorno,Enter the BBS Command to enter the Maildoor}
{sete-p0 new_bbsid}
{subs abbr,1,2,%bbsid}
{disp 4,30,%cfm_col, }
{disp 5,30,%cfm_col, }
{disp 6,30,%cfm_col, }
{disp 7,30,%cfm_col, }
{disp 8,30,%cfm_col, }
{disp 4,30,%cfm_col, LINK = ^(:qwk^)}
{disp 5,30,%cfm_col, ABBR = %abbr}
{disp 6,30,%cfm_col, BBSID = %bbsid}
{disp 7,30,%cfm_col, BBSware = %bbsware}
{disp 8,30,%cfm_col, MAILware = %mailware}
{setv ok}
{sete-p0 clea}
{inpu ok,Enter YES to write COMMOFON.NEW}
{inst ok,n} {ifco clea}
{comp ok,yes} {ifco ,new_bbsid}
{disp ,,,^mCOMMOFON.NEW can be your new dialing directory.^j}
{disp ,,,^mYou need to EXIT Commo and rename COMMOFON.NEW to COMMO.FON^j}
{disp ,,,^mfor these additions to take effect.^j^j}
*
* ┌───────────────────────────────────────────────────────────────────┐
* │ Example of the data to be appended to an entry in COMMOFON.NEW; │
* │ │
* │ (bbsid,escape) (abbr,es) (dorno,mmail|) (mail,mm2) (bbs,pcb) │
* └───────────────────────────────────────────────────────────────────┘
{ifex %_hom%commofon.new,freshen}
{exec-n copy %_hom%%_fon %_hom%commofon.bak}
{goto rope}
{:freshen}
{exec-n copy %_hom%commofon.new %_hom%commofon.bak}
{:rope} {rope %_hom%commofon.bak,clea}
{wope %_hom%commofon.new}
{setv count,1}
{:add_fon}
{read line}
{inst line,%temp}
{ifco ,add_line}
{comp cntr,%count}
{ifco append}
{incr count}
{:add_line}
{writ %line}
{goto add_fon}
{:append}
{inst line,^)}
{subs p1,1,%_pos,%line} {setv pos,%_pos} {incr pos,2}
{subs p2,%pos,255,%line}
{inst p2,^)} {setv pos,%_pos} {incr pos,2}
{subs p3,%pos,255,%p2}
{subs p2,1,%_pos,%p2}
{inst p3,^)} {setv pos,%_pos} {incr pos,2}
{subs p4,%pos,255,%p3}
{subs p3,1,%_pos,%p3}
{inst p3,^(}
{subs p3,1,%_pos,%p3}
{setv p3,%p3%qwk^)}
{setv line,%p1 %p2 %p3 %p4 ^(bbsid,%bbsid^) ^(abbr,%abbr^) ^(dorno,%dorno^) ^(mail,%mailware^) ^(bbs,%bbsware^)}
{writ %line}
{incr count}
{goto add_fon}
{:clea} {setv line}
{setv p1}
{setv p2}
{setv p3}
{setv p4}
{setv ok}
{setv abbr}
{setv cntr}
{setv mailware}
{setv bbsware}
{setv cs_col}
{setv bbs_col}
{setv mwa_col}
{setv ope_col}
{setv cfm_col}
{clea}
{exec-n del %_hom%commofon.bak}
{macl %_mac,auto} ;return control to COMMO.MAC
┌────────────────────────────────────────────┐
│ Edit COMMO.MAC with your external editor │
└────────────────────────────────────────────┘
* The short macro below uses an external editor to edit COMMO.MAC.
* It is called from COMMO.MAC ... putting CS-MAC in Commo's memory while
* you are editing COMMO.MAC.
* The revised COMMO.MAC is active after you close your editor.
{:ed_cmac}
{exec-n %ext_ed %_hom%%_mac} {macl %_mac,auto}
┌────────────────────────────┐
│ Menu Driver for Sessions │
└────────────────────────────┘
* This menu driver features the use of :parse to draw and fill
* boxes. It also contains :box_draw and :box_fill routines.
{:s_menu}
{setv row,%_row}
{setv col,%_col}
{sete-p0 mnu_x}
{setv mt} ;reset flags
{setv hold}
{setv count,0} ;initialize various
{setv pcount,0} ;initialize :parse
{setv c_mtit,70} ;set menu title color
{setv c_mbox,1f} ;set menu box color
{setv c_menu,17} ;set menu color
{setv c_pbox,07} ;set prompt box color
{setv c_pmpt,0e} ;set menu prompt color
{setv c_sbar,30} ;set summary bar color
{setv c_bbs,0e} ;set bbslist color
{disp 3,23,%c_mtit,┌────────────────────────────────────┐}
{disp 4,23,%c_mtit,│ Commo Mail & File fetchin' Menus │}
{disp 5,23,%c_mtit,└────────────────────────────────────┘}
{setv cmd_str,box_make 6 23 16 60 %c_mbox}
{call parse}
{setv cmd_str,box_fill 7 24 15 59 %c_menu}
{call parse}
{disp 8,27,%c_menu,1. Mark BBSes to dial}
{disp 9,27,%c_menu,2. Choose Start Time}
{disp 10,27,%c_menu,3. Make File transfer agenda}
{disp 11,27,%c_menu,4. }
{disp 12,27,%c_menu,5. }
{disp 13,27,%c_menu,6. }
{disp 14,27,%c_menu,7. }
{setv cmd_str,box_make 17 23 19 60 %c_pbox}
{call parse}
{:clect}
{disp 18,24,%c_pmpt, }
{disp 18,27,%c_pmpt,Your Choice: }
{disp ,,%c_pmpt, ^h^h}
{setg 600,mnu_x,l}
{gets-h cmd,1,mnu_x}
{comp cmd,1} {ifco mnu_1}
{comp cmd,2} {ifco mnu_2}
{comp cmd,3} {ifco mnu_3}
{comp cmd,4} {ifco mnu_4}
{goto clect}
{:mnu_1}
{disp 18,24,%c_pmpt, }
{disp 18,27,%c_pmpt,BBS Name to Mark: }
{gets cmd,8,clect}
{leng %cmd}
{comp _len,3}
{ifco-L mnu_1}
{rope %_hom%%_fon,mnu_1}
{:gto_loop}
{read line}
{inst line,%cmd}
{ifco ,gto_loop}
{rclo}
{mark %cmd}
{incr count}
{disp %count,1,%c_bbs,Marked: %cmd}
{disp 24,1,%c_sbar, CS-MAC Agenda Summary Bar }
{disp 24,34,%c_sbar,%count BBSes Marked}
{goto mnu_1}
{:mnu_2}
{disp 18,24,%c_pmpt, }
{disp 18,27,%c_pmpt,Start Dial Time (hh:mm): }
{gets hold,5,clect}
{leng %hold}
{comp _len,5}
{ifco-E ,mnu_2}
{subs test,3,1,%hold}
{comp test,:}
{ifco ,mnu_2}
{disp 24,56,%c_sbar,Holding Until %hold^m}
{setv mt,n}
{goto clect}
{:mnu_3}
{setv mt,n}
{macl action.mac,alf}
{:mnu_4}
your menu additions go here
{goto clect}
{:mnu_x}
{setv cmd_str,box_fill 3 23 19 60 00}
{call parse}
{disp %row,%col}
{:esc} {comp count} {ifco no_bar}
{comp count,0} {ifco no_bar}
{disp 24,1,%c_sbar, CS-MAC Agenda Summary Bar }
{disp 24,31,%c_sbar,%count BBSes Marked^m}
{comp hold} {ifco no_bar}
{disp 24,51,%c_sbar,Holding Until %hold^m}
{:no_bar}
{setv count}
{setv c_mtit}
{setv c_mbox}
{setv c_menu}
{setv c_pbox}
{setv c_pmpt}
{setv c_sbar}
{setv c_bbs}
{macl %_mac%,do_agenda}
┌─────────────────────────┐
│ Routine to draw a box │
└─────────────────────────┘
* Thanks to Jim Rahfeldt for speeding these routines to draw entire lines.
*
* This routine takes five arguments: start_row = %arg1
* start_col = %arg2
* end_row = %arg3
* end_col = %arg4
* box_color = %arg5
{:box_make}
{setv dlen,%arg4} ;preserve ending column value
{decr dlen} {decr dlen,%arg2} ;compute dlen = line length - 2
{subs dashes,1,%dlen,──────────────────────────────────────────────────────────────────────────────}
{disp %arg1,%arg2,%arg5,┌%dashes┐}
{:bumper}
{incr arg1}
{comp arg1,%arg3}
{ifco bottom}
{disp %arg1,%arg2,%arg5,│}
{disp %arg1,%arg4,%arg5,│}
{goto bumper}
{:bottom}
{disp %arg1,%arg2,%arg5,└%dashes┘}
{setv dlen} {setv dashes} ;free subroutine variable space
{setv arg0}
{setv arg1}
{setv arg2}
{setv arg3}
{setv arg4}
{setv arg5}
{retu}
┌─────────────────────────┐
│ Routine to fill a box │
└─────────────────────────┘
* This routine takes five arguments: start_row = %arg1
* start_col = %arg2
* end_row = %arg3
* end_col = %arg4
* fill_color= %arg5
{:box_fill}
{incr arg4} {decr arg4,%arg2} ;compute actual line length
{subs filler,1,%arg4, }
{:boxer}
{disp %arg1,%arg2,%arg5,%filler}
{incr %arg1}
{comp arg1,%arg3}
{ifco-LE boxer}
{setv filler} ;free subroutine variable space
{setv arg0}
{setv arg1}
{setv arg2}
{setv arg3}
{setv arg4}
{setv arg5}
{retu}
┌─────────────────┐
│ Parse Routine │
└─────────────────┘
* This routine parses a %cmd_str% variable into "space delimited"
* arguments. %arg0 is the routine to be called after :parse.
* Subsequent arguments %arg1, %arg2, %arg3, etc.
{:parse}
{inst %cmd_str%, }
{ifco ,eparse}
{setv pos,%_pos}
{decr pos}
{subs arg%pcount,1,%pos,%cmd_str}
{incr pos,2}
{subs cmd_str,%pos,255,%cmd_str}
{incr pcount}
{goto parse}
{:eparse}
{setv arg%pcount,%cmd_str}
{setv cmd_str}
{setv pcount,0}
{goto %arg0}
┌──────────────────────┐
│ Modem Config Macro │
└──────────────────────┘
*
* The general purpose of this macro is to provide initial setup
* of a modem.
*
* This macro reads a file called MODEM.DAT
*
* CS-MAC.MAC can send configuration strings to your modem
* CS-MAC.MAC can modify COMMO.SET with the modem initialization
* string recommended in MODEM.DAT
*
* MODEM.DAT is of this general form:
*
* Modemmake: US Robotics Courier HST
* Configure: AT^M~~AT&F^M~~~
* Configure: ATX6~&B1~&H1~&R2~S7=60~S11=55^M~~
* Configure: AT^M~~AT&W^M
* Init'lize: ATZ^M
*
* MODEM.DAT may be made by translating a DATASTORM TECHNOLOGIES, INC.
* file called MODEMS.DAT. The translation is made by the :x_late
* routine later in this macro file.
*
***********************************************************************
* *
* MODEMS.DAT COPYRIGHT (C) 1991, 1992 DATASTORM TECHNOLOGIES, INC. *
* *
* This file is used by PCINSTAL to configure PROCOMM PLUS 2.01 for *
* specific modems. PLEASE DO NOT MODIFY!! Issue Date: 12/2/92 *
* *
***********************************************************************
*
* This COMMO macro is at early stages of development. Your suggestions
* for improvement will be taken seriously.
{:modem}{setv row,%_row}
{setv col,%_col}
{call intro}
{sete-p0 e_modem}
{ifex %_hom%modem.dat,,no_file}
{rope %_hom%modem.dat,no_hit}
{comp oops} {ifco go_m}
{disp 9,25,1e,▌ Manufacturer "%temp%" not found ▐}
{:go_m} {setv temp}
{inpu temp,Enter Search criteria here}
{disp 9,25,07, }
{comp temp}
{ifco e_modem}
{setv count,1}
{clea}
{disp 1,55,0e,Searching for: }
{disp 1,70,0f,%temp}
{setv col,1}
{setv row,1}
{setv ncol,4}
{:next_m}
{disp %row,%col,87, Searching ... }
{read line}
{inst line,%temp}
{ifco label,next_m}
{:label}{inst line,modemmake:}
{ifco ,next_m}
{subs 10,12,52,%line}
{inst 10,%temp}
{ifco ,next_m}
{subs line,11,34,%line}
{disp %row,%col,07, }
{disp %row,%col,0e,%count. }
{disp %row,%ncol,07,%line}
{incr count}
{setv row,%count}
{comp count,25}
{ifco-l next_m}
{setv col,40}
{setv ncol,43}
{decr row,22}
{goto next_m}
{:no_hit}
{disp %row,%col,07, }
{comp count,1}
{ifco-g model_c}
{setv oops,y}
{goto modem}
{:model_c}
{setv cntr}
{inpu cntr,Which Number? [PgUp] sees behind box}
{comp cntr} {ifco modem}
{comp cntr,%count}
{ifco-ge model_c}
{comp cntr,0} {ifco model_c}
{setv count,1}
{clea}
{disp 1,1,07,Scanning for "%temp%" Selection #: %cntr}
{rope %_hom%modem.dat,e_modem}
{:next_n}
{read line}
{inst line,%temp}
{ifco chek,next_n}
{:chek} {inst line,modemmake:}
{ifco ,next_n}
{subs 10,12,52,%line}
{inst 10,%temp}
{ifco ,next_n}
{comp cntr,%count}
{ifco this_one}
{incr count}
{goto next_n}
{:this_one}
{setv count,1}
{setv cntr,1}
{wope-a %_hom%modem.set}
{writ}
{writ ***********************************************************************}
{writ * *}
{writ * CS-MAC.MAC has a macro which scans MODEM.DAT. Data below has been *}
{writ * selected from MODEM.DAT to best configure your COMMO/Modem combo. *}
{writ * *}
{writ ***********************************************************************}
{writ}
{writ %line}
{setv modem,%line}
{writ}
{setv cnfg,y}
{sete-p0 e_modem}
{disp 2,1,07,%modem%}
{inpu cnfg,Send Config to your Modem now?}
{:dsp_lp}
{inst line,configure}
{ifco ,no_send}
{subs line,12,70,%line}
{writ Configuration Line %count: %line%}
{:do_cnfg}
{incr count}
{inst cnfg,y}
{ifco ,no_send}
{send ~~~~~%line}
{:no_send}
{inst line,init'lize}
{ifco ,no_init}
{subs line,12,70,%line}
{setv init, ^(set _modini,%line^) From MODEM.DAT & CS-MAC.MAC}
{writ}
{writ %init%}
{writ}
{setv mod,y}
{:no_init}
{read line}
{comp line}
{ifco e_modem}
{goto dsp_lp}
{:e_modem}
{clea}
{wclo}
{rclo}
{comp mod} {ifco nonote}
{disp 1,4,07,***********************************************************************}
{disp 2,4,07,* CS-MAC.MAC has written to a file named *}
{disp 2,45,07,%_hom%MODEM.SET}
{disp 3,4,07,***********************************************************************^j^m}
{disp 7,4,07,***********************************************************************}
{disp 8,4,07,* If you wish, the new INIT can be substituted in your COMMO.SET *}
{disp 9,4,07,***********************************************************************^j^m}
{sete-p0 nonote}
{inpu mod,Modify COMMO.SET?}
{inst mod,y} {ifco ,nonote}
{exec-n copy %_hom%commo.set %_hom%commoset.bak}
{rope %_hom%commoset.bak,nonote}
{wope %_hom%commo.set}
{:set_loop}
{read line}
{inst line,_modini}
{ifco insert}
{writ %line}
{goto set_loop}
{:insert}
{writ}
{inst line,^(}
{setv pos,%_pos} {incr pos}
{subs line,%pos,80,%line}
{inst line,^)}
{setv pos,%_pos} {decr pos}
{subs l1,1,%pos,%line}
{incr pos,2}
{subs l2,%pos,80,%line}
{setv line, %l1% %l2%}
{setv l1}
{setv l2}
{writ %line}
{writ}
{writ ***********************************************************************}
{writ * CS-MAC.MAC has a macro which scans MODEM.DAT. Data below has been *}
{writ * selected from MODEM.DAT to best configure your COMMO/Modem combo. *}
{writ ***********************************************************************}
{writ}
{writ %modem}
{writ}
{writ %init}
{goto set_loop}
{:nonote}
{setv 10}
{setv mod}
{setv ncol}
{setv cntr}
{setv oops}
{setv init}
{setv modem}
{disp %row,%col}
{setv row}
{setv col}
{macl %_mac}
{:intro}{clea}
{disp 3,4,07,***********************************************************************}
{disp 4,4,07,* CS-MAC.MAC can search MODEM.DAT just like a PCBoard (Z)ippy scan. *}
{disp 5,4,07,* Enter a portion of manufacture or model or feature name to get a *}
{disp 6,4,07,* list (e.i. "HST", "v.32", "Robotics", "Turbo", "Speed", "Zyxel") *}
{disp 7,4,07,***********************************************************************}
{disp 16,4,07,***********************************************************************}
{disp 17,4,07,* *}
{disp 18,4,07,* CS-MAC.MAC standing ready to scan MODEM.DAT to configure COMMO. *}
{disp 19,4,07,* *}
{disp 20,4,07,***********************************************************************}
{retu}
{:no_file}
{disp 16,4,07,***********************************************************************}
{disp 17,4,07,* *}
{disp 18,4,07,* MODEM.DAT must be in your Commo Home directory: ( *}
{disp 19,4,07,* *}
{disp 20,4,07,***********************************************************************}
{disp 18,56,70, %_hom% }
{disp 18,,07,)}
{disp %row,%col}
{macl %_mac}
*
*─────────────────────────────────────────────────────────────────────────────
*
* {macl modem.mac,x_late} in your COMMO.MAC to start.
*
* This macro routine translates a file called MODEMS.DAT which is provided
* to support ProComm Plus. The resulting file is called MODEM.DAT.
{:x_late}
{setv row,%_row}
{setv col,%_col}
{sete-p0 e_modem}
{ifex %_hom%modems.dat,,no_fils}
{rope %_hom%modems.dat,no_hits}
{wope %_hom%modem.dat}
{:loop} {read line}
{inst line,initstring} {ifco add_in}
{inst line,transmit} {ifco add_cf}
{inst line,modem "} {ifco add_mo}
{goto loop}
{:add_in}
{setv pos,%_pos}
{incr pos,12}
{subs line,%pos,80,%line}
{inst line,"}
{setv pos,%_pos} {decr pos}
{subs line,1,%pos,%line}
{setv line,Init'lize: %line}
{writ %line}
{goto loop}
{:add_cf}
{setv pos,%_pos}
{incr pos,10}
{subs line,%pos,80,%line}
{inst line,"}
{setv pos,%_pos} {decr pos}
{subs line,1,%pos,%line}
{setv line,Configure: %line}
{writ %line}
{goto loop}
{:add_mo}
{writ}
{setv pos,%_pos}
{incr pos,7}
{subs line,%pos,80,%line}
{inst line,"}
{setv pos,%_pos} {decr pos}
{subs line,1,%pos,%line}
{setv line,Modemmake: %line}
{writ %line}
{goto loop}
{:no_hits}
{wclo}
{rclo}
{disp %row,%col}
{macl %_mac}
{:no_fils}
{disp 16,4,07,***********************************************************************}
{disp 17,4,07,* *}
{disp 18,4,07,* MODEMS.DAT must be in your Commo Home directory: ( *}
{disp 19,4,07,* *}
{disp 20,4,07,***********************************************************************}
{disp 18,57,70, %_hom% }
{disp 18,,07, )}
{disp %row,%col}
{macl %_mac}
┌────────────────────────────────────────┐
│ Routine to strip comments from .MACs │
└────────────────────────────────────────┘
* This routine opens a .MAC file that you specify, reads it
* line by line, deletes lines that have an asterisk within the first
* three characters, and removes comments following a semi-colon.
* The new file has a file extension of .CFS
*
* The purpose of this routine is to minimize RAM usage by
* shortening MAC files.
{:strip}
{sete-p0 e_strip}
{setv file,%_hom%}
{:re_in}{inpu file,name of .MAC file to strip}
{inst %file,.} {ifco ,nodot} {setv pos,%_pos} {decr pos}
{subs file,1,%pos,%file} {setv pos}
{:nodot}{ifex %file%.mac,,re_in} ;make sure file exists
{clea}
{disp 3,1,,Stripping %file%.MAC into %file%.CFS^m^j}
{disp ,,,Line: }
{rope %file%.mac,e_strip} ;open .MAC to read
{wope %file%.cfs} ;open .CFS to write
{setv count,0}
{:s_loop}
{incr count}
{disp ,7,,%count}
{read line}
{comp line} {ifco no_com} ;write empty lines
{subs temp,1,3,%line} ;look at first three chars
{inst temp,*} {ifco s_loop} ; if a * skip the line
{subs temp,1,11,%line} ;look at first 11 chars
{inst temp,^(} {ifco ,no_com} ;look for a left curley
{subs line,%_pos,255,%line} ;delete leading whitespace
{inst line,;} {ifco ,no_com} ;look for a semicolon
{setv pos,%_pos} {decr pos} ;get semicolon position
{subs temp,%pos,255,%line} ;what follows semicolon?
{inst temp,^)} {ifco no_com} ; if a right curly, write!
{inst temp,)} {ifco no_com} ; if a right paren, write!
{subs line,1,%pos,%line} ;otherwise, delete comment
{:no_com}
{writ %line} ;xxx.MAC --> xxx.CFS file
{goto s_loop} ;read next line
{:e_strip}
{setv count}
{wclo} ;close .CFS file
{disp 6,1,,%file.mac has been stripped into %file.cfs^m^j}
{exec-w10 dir %file.*}
{macl %_mac%,ret%ret} ;reload base.MAC
┌──────────────────────────────────┐
│ Menu driven .CFG file Routines │
└──────────────────────────────────┘
* These macro routines are designed for easy expansion and upgrading.
* After a user has run CS-MAC once, future upgrades will build on the
* initial configuration file.
* This macro also copes when a user skips versions .... the resulting
* .CFG file will have all (and only) new variable definitions appended.
* The CS-MAC user won't need to edit old, unchanged data.
{:new_user}
{call welcome}
{sete-p0 upgrade}
{call make_cfg} ;make default .cfg file
{:upgrade}
{sete-p0 ver_loop}
{call thanks}
{setv ver_ck,%ver} ;set var to check .cfg version
{:ver_loop}
{decr ver_ck} ;start looking for older .cfg
{leng %ver_ck}
{comp %_len,1} {ifco ,no_pad} ;pad single digit version name
{setv ver_ck,0%ver_ck} ; with a leading zero
{:no_pad}
{ifex %_hom%cs-mac%ver_ck.cfg,append} ;looking for old .cfg file
{comp ver_ck,06} {ifco ,ver_loop} ;if version = 06
{setv ver_ck} {goto f_loop} ;use CS-MAC.CFG (default)
{:append}
{wope-a %_hom%cs-mac%ver_ck.cfg} ;open old .cfg in append
{call %ver_ck} ;add new default variables
{:f_loop}
{sete-p0 bail_out}
{rope %_hom%cs-mac%ver_ck.cfg,ready} ;open cs-macxx.cfg to read
{wope %_hom%cs-mac%ver.cfg} ;open newest version cs-mac.cfg
{writ * CS-MAC%ver.CFG} ;Header for newest .CFG file
{writ * %_dat% %_tim%}
{writ}
{writ * Each variable setting line in this .CFG file has}
{writ * the form .... variable,value ;comment here}
{writ}
{disp 9,20,,Don't forget ... Alt-Y will erase input field}
{:ug_loop}
{read line}
{inst line,*} {ifco ug_loop} ;skip default header
{comp line} {ifco ug_loop} ;skip blank lines
{inst line,;} {ifco ,no_pmt} ;use semicolon for prompts
{setv pos,%_pos} {incr pos}
{subs prompt,%pos,30,%line}
{inst line, } ;use two spaces to end variable
{setv pos,%_pos} {decr pos} ; to allow space in name, etc.
{subs line,1,%pos,%line}
{:no_pmt}
{inst line,,} {ifco ,ug_loop} ;is this a variable definition?
{setv pos,%_pos} {decr pos}
{subs var,1,%pos,%line}
{incr pos,2}
{subs valu,%pos,40,%line}
{inpu valu,%var = %prompt} ;setv according to .cfg
{setv pad, }
{leng %var%,%valu}
{setv pad_l,40}
{decr pad_l,%_len}
{subs pad,1,%pad_l,%pad}
{writ %var%,%valu%%pad%;%prompt}
{goto ug_loop} ;loop until .cfg all read
{:write}{writ %line} {goto ug_loop}
{:bail_out}
{rclo}
{wclo}
{exec-n del %_hom%cs-mac%ver.cfg}
{goto commo}
{:ready}
{sete-p0 commo}
{wclo}
{disp 9,20,, }
{disp 9,1,,%_hom%cs-mac%ver%.cfg has been written.}
{disp 10,1,,It will be read into your COMMO startup.^j^j^m}
{paus 10}
{:commo}{setv var} {setv valu}
{setv pos} {setv prompt}
{setv pad} {setv pad_l}
{setv ver_ck}
{wclo}
{macl %_mac%,start}
{:welcome}
{sete-p0 w_esc}
{ifex %_hom%how,,no_how}
{rope %_hom%how,end_w}
{setv count,1}
{:w_lop}{read line}
{disp ,,, %line^m^j}
{incr count}
{comp count,20}
{ifco-l w_lop}
{paus 30}
{:w_esc}{setv count,1}
{goto w_lop}
{:end_w}{sete-p0 no_how}
{paus 30}
{:no_how}
{clea}
{disp ,,, Welcome to the CS-MAC series!^m^j}
{disp ,,, A default config file (CS-MAC.CFG) has been written for you ... ^m^j}
{retu}
{:thanks}
{disp ,,,^j^j^m}
{disp ,,, Thank you for using the CS-MAC series.^m^j}
{disp ,,, You will now be prompted to confirm or change the setting^m^j}
{disp ,,, of variables for your *PERSONAL* %hom%CS-MAC%ver%.CFG file.^m^j}
{retu}
{:make_cfg}
{wope %_hom%cs-mac.cfg}
{writ * CS-MACxx Default Version %ver}
{writ}
{writ * The config file feature of the CS-MAC series}
{writ * is designed to make future upgrades easier.}
{writ}
{writ * An empty line or a line with a "*" in it will be ignored}
{writ * during variable definition. These are comment lines.}
{writ}
{writ * The order of "setv" items is unimportant.}
{writ}
{writ * Each variable setting line in this .CFG file has}
{writ * this form variable,value ;comment here}
{writ}
{writ name,Chuck Seyboldt ;your logon name}
{writ sig,Chuck∙S ;your signature}
{writ v_ph,2075551212 ;your Voice Phone Number}
{writ d_ph,2075551212 ;your Data Phone Number}
{writ b_day,042365 ;your Birthdate}
{writ auto,n ;"y" for Autopilot ON}
{writ xpert,n ;"y" for complex DOORWAY toggle}
{writ grafix,y q ns ;ANSI logon prompt}
{writ ramdr,d: ;your RAMDrive}
{writ bu_dr,b: ;Backup drive for .MACs}
{writ dosdir,c:\dos ;your DOS dir}
{writ ins_dir,c:\co\ins ;dir for docs & instructions}
{writ lst_dir,c:\doc ;dir for BBS file list storage}
{writ savedir,c:\co\sav ;dir for capture files}
{writ utildir,c:\util ;dir for utility programs}
{writ ext_ed,c:\util\qedit.exe ;drive:\path\external_editor}
{writ ext_li,c:\util\list.com ;drive:\path\external_lister}
{writ pk_zip,c:\util\pkzip.exe ;drive:\path\ZIP_program}
{writ pk_un,c:\util\pkunzip.exe ;drive:\path\UNZIP_program}
{writ prot,z ;file trans protocol (z,y,x)}
{writ mprot,z ;mail trans protocol (z,y,x)}
{writ qwkdr,c:\qwk ;dir for .QWK files}
{writ repdr,c:\qwk ;dir for .REP files}
{writ reader,c:\jr\jabber.exe ;your mail reader program}
{writ tagfile,c:\jr\taglines.tag ;filename for your taglines}
{writ qrdr,qwk ;.QWK packet rename routine}
{writ znr,znr ;.ZNS packet rename routine}
{writ handle,cboldt ;handle for Internet use}
{writ znrdr,c:\znr ;dir for ZIPNEWS reader}
{writ znpak,c:\qwk ;dir for ZIPNEWS packets}
{writ cap,%%savedir\%%_mon%%%%_day.cap ;capture filename}
{writ}
{writ * New variables will be appended based on the}
end ver {writ * latest CS-MACxx.CFG in your %_hom directory}
{:07} {writ}
(writ v8_var,version8 ;append later version vars here)
end ver (writ v8_v#2,version_8 ;follow this example format)
{:08} (writ)
{wclo}
{retu}